<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="JS/bootstrap-3.3.7/css/bootstrap.min.css"/>
    <script src="JS/jquery-3.5.0.min.js"></script>
    <script src="JS/bootstrap-3.3.7/js/bootstrap.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<body>
    <div class="container" id="vue">
        <!-- Button trigger modal -->
        <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
            Launch demo modal
        </button>
        <button data-target="#myModal1"data-toggle="modal" >分享</button>

        <!-- Modal -->
        <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
                    </div>
                    <div class="modal-body">
                        ...
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        <button type="button" class="btn btn-primary">Save changes</button>
                    </div>
                </div>
            </div>
        </div>
</body>
</html>
<script>
    function showBOX(){
        $(".submitBox").show()
    }
    let vm=new Vue({
        el:'#vue',
        data:{
            code:"",
            aging:"",
            fileID:555,
            userID:1
        },

        methods:{
            show:function (){
                $(".input-text").show();
                this.code=""
            },
            hide:function (){
                $(".input-text").hide();
            },
            submit:function (){
                let codeVal=this.code;
                let agingVal=this.aging;
                let filIDVal=this.fileID;
                let userIDVal=this.userID;
                let massage = JSON.stringify({codeVal,agingVal,filIDVal,userIDVal});
                console.log(massage);
                $.ajax({
                    contentType: 'application/json; charset=UTF-8',
                    type:"post",
                    data:massage,
                    url:"http://localhost:55555/netdisc_share/share/link",
                    success:function (resp){
                        let parse = JSON.parse(resp);
                        console.log(parse)
                    }
                })
            },
        }
    });



</script>
<script>
    function http(massage,urlSuffix,callback){
        let urlBase="http://localhost:55555/netdisc_share/";
        let url=urlBase+urlSuffix;
        $.ajax({
            contentType: 'application/json; charset=UTF-8',
            type:"post",
            data:massage,
            url:url,
            success:function (resp){
                let parse = JSON.parse(resp);
            }
        })
    }

</script>
